package model

import (
	"github.com/docker/docker/client"
)

// DClient
// @Description: 初始化docker核心链接
func DClient() *client.Client {
	apiClient, err := client.NewClientWithOpts(client.WithVersion("1.45"), client.FromEnv)
	if err != nil {
		panic(err)
	}
	defer apiClient.Close()
	return apiClient
}
